package cn.nexd.map.rendering.core.componet;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.view.MotionEvent;

import cn.nexd.map.rendering.core.SVGMapBaseOverlay;
import cn.nexd.map.rendering.core.componet.data.Feature;
import cn.nexd.map.utils.BitmapUtils;


/**
 * Created by codingfish on 15/7/29.
 */
class HighLightOverlay extends SVGMapBaseOverlay {


    private Feature feature;

    public HighLightOverlay(Feature feature) {
        this.feature = feature;
        showLevel = LOCATION_LEVEL - 1;
    }

    @Override
    public void onDestroy() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onTap(MotionEvent event) {

    }

    @Override
    public void draw(Canvas canvas, Matrix matrix, float currentZoom, float currentRotateDegrees) {
        canvas.save();
        Paint paint = new Paint();
        paint.setColor(BitmapUtils.color);
        canvas.setMatrix(matrix);
        canvas.drawPath(feature.getPath(), paint);
        canvas.restore();
    }
}
